package com.shopping.dao;

import com.shopping.bean.Category;
import com.shopping.util.Page;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

@Mapper
public interface CategoryDao {
    int addCategory(@Param("category") Category category);
    int editCategory(@Param("category")Category category);
    int deleteCategory(@Param("id")int id);
    List<Category> getList(@Param("page")Page page, @Param("text")String text);
    List<Category>  getChildren(@Param("id")int id);
    Category getCategoryById(@Param("id")int id);
    int getCount(@Param("text")String text);

}